package model.manager;

import java.sql.SQLException;
import java.util.List;

import model.vo.Item_dataVO;
import model.vo.TrackingVO;

import com.ibatis.sqlmap.client.SqlMapClient;

public class ManagerDao {
	private SqlMapClient sqlMapClient;
	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}
	// 원료 주문시,
	public void itemDataInsert(Item_dataVO ivo) throws SQLException {
		sqlMapClient.insert("manager.itemDataInsert", ivo);
	}
	// 원료 리스트 받아오는,
	public List<Item_dataVO> itemDataList() throws SQLException{
		List list = sqlMapClient.queryForList("manager.itemDataList");
		//System.out.println(list);
		 return list;
	}
	// 추적 리스트 받아오는,
	public List<TrackingVO> TrackingList(String Days) throws SQLException{
		List list = sqlMapClient.queryForList("manager.TrackingList", Days);
		//System.out.println(list);
		 return list;
	}
	//오늘이 몇일인지 알아오기
	public String toDays() throws SQLException {
		return (String) sqlMapClient.queryForObject("manager.toDays");
	}
}
